import java.util.Scanner;

/**
 * Created by dllo on 18/3/28.
 */
public class Question04 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个四位数");
        int a = scanner.nextInt();
        int b = a;

        int a1000 = a / 1000;
        a = a % 1000;

        int a100 = a / 100;
        a = a % 100;

        int a10 = a / 10;
        a = a % 10;

        if (a1000*a1000*a1000*a1000+a100*a100 * a100 * a100 + a10*a10 * a10 * a10 +a* a * a * a == b) {
            System.out.println("是四叶玫瑰数");
        } else {
            System.out.println("不是四叶玫瑰数");
        }
    }
}
